package com.weixing.mall.provider.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.weixing.mall.base.orm.MPage;
import com.weixing.mall.provider.api.model.enums.OrderTypeEnum;
import com.weixing.mall.provider.model.domain.Order;
import com.weixing.mall.provider.model.dto.ChgKefuRemarkDto;
import com.weixing.mall.provider.model.query.AfterSaleQuery;
import com.weixing.mall.provider.model.query.AgentOrderQuery;
import com.weixing.mall.provider.model.query.CustomerOrderQuery;
import com.weixing.mall.provider.model.query.kefu.KefuOrderQuery;
import com.weixing.mall.provider.model.vo.*;
import com.weixing.mall.provider.model.vo.agent.AbnormalOrderStatisticVo;
import com.weixing.mall.provider.model.vo.agent.AgentSaleStatisticVo;
import com.weixing.mall.provider.model.vo.agent.UpPayStatisticVo;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 订单模块-订单表 服务类
 * </p>
 *
 * @author Small
 * @since 2019-11-20
 */
public interface IKefuOrderService {
    IPage selectOrderList(CustomerOrderQuery query, Page initMpPage);

    StaticVo selectOrderListTotal(CustomerOrderQuery customerOrderQuery);

    IPage<KefuAuditOrderVo> toAudit(Page initMpPage, CustomerOrderQuery customerOrderQuery);

    StaticVo toAuditTotalAmount(CustomerOrderQuery customerOrderQuery);

    IPage<KefuAuditOrderVo> noBindKefu(Page initMpPage, CustomerOrderQuery query);

    StaticVo noBindKefuTotalAmount(CustomerOrderQuery query);

    IPage<SalesAchiVo> salesOfAgent(Page initMpPage, OrderTypeEnum type, AgentOrderQuery query);

    MPage<SalesAchiVo> salesOfKefu(Page initMpPage, OrderTypeEnum type, AgentOrderQuery query);

    void bindBatch(String ids);

    void chgKefuRemark(ChgKefuRemarkDto dto, Long uid);

    /**
     * 查询客服下单订单列表
     *
     * @param initMpPage   分页参数
     * @param query        查询条件
     * @return             订单列表
     */
    IPage<KefuAuditOrderVo> selectKefuOrderList(Page initMpPage, CustomerOrderQuery query);

    /**
     *
     * @param initMpPage
     * @param query
     * @return
     */
    IPage<FrontAgentOrderVo> listOrderOfPage(Page initMpPage, AgentOrderQuery query);

    AgentSaleStatisticVo listOrderSalesStatistics(AgentOrderQuery query);

    IPage<FrontAgentOrderVo> selectAfterSaleOrderList(MPage initMPage, AfterSaleQuery query);

    AbnormalOrderStatisticVo selectAfterSaleStatistics(AfterSaleQuery query);

    AbnormalOrderStatisticVo outOfStockReportStatistics(AgentOrderQuery query);

    AbnormalOrderStatisticVo canceledStatistics(AgentOrderQuery query);

    IPage<FrontAgentOrderVo> selectUpPayOrderList(Page initMpPage, AgentOrderQuery query);

    UpPayStatisticVo upPayStatistics(AgentOrderQuery query);

    IPage<SalesAchiVo> achievement(Page page, OrderTypeEnum type, AgentOrderQuery query);
}
